#include <iostream>//4430091
#include <string>
using namespace std;
int main() {
	int max = 1e8; int sum1 = 0, sum2 = 0; int ans=0;
	cout << ans << endl;
	for (int i = 1; i <= max; i++) {
		string str = to_string(i);
		int digits = str.length();
		if (digits % 2 != 0)continue;
		int n = digits / 2;
		sum1 = 0; sum2 = 0;
		for (int j = 0; j < n; j++) {
			sum1 += str[j] - '0';
			sum2 += str[n + j] - '0';
		}
		if (sum1 == sum2) {
			ans++;
		}
        printf("%d\n", ans);
	}
    
    return 0;
}
